Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stash review support #1

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

inirudebwoy
Copy link

@inirudebwoy inirudebwoy commented Dec 2, 2017

Extend plugin with stash support.
I had to make "matches" in manifest.json really open. Possibly can be done better than this.

Unfortunately I'm getting 403 when pushing, maybe you could take a look into this.

Copy link
Owner

@kleewho kleewho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the matches stay like this we will have this script running for every website. Please add something like:

if (bitbucket || stash) {
  //run the script
} else {
  //do nothing
}

@@ -20,7 +20,7 @@

"content_scripts": [
{
"matches": ["*://bitbucket.org/*/pull-requests/*"],
"matches": ["<all_urls>"],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That won't work in current incarnation. The script will load for every page, which means it will measure time for every page and we don't want that.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I guess this would have to stay more or less open like this and we have to guard it in the script itself


const url = new URL(window.location.href);
// example of URL to parse
// https://stash.clearcode.cc/projects/CCADS/repos/backend/pull-requests/137/commits
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. Now I see that for hosted solutions it might work, but for custom ones like yours we should have configuration. And I should definitely add support for github so I will now how much time I have spent on this review

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 exactly. So this would require a bit of work on the configuration part.

@inirudebwoy
Copy link
Author

OK, seems to be working fine. Please verify if this is what you requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants